﻿define(function (require) {

    var utility = require('utility/utility.js');
    var service = require('utility/service');

    var DateView = require('views/date.view');
    var UpdateView = require('views/update.view');
    var NoticificationView = require('views/notification.view');
    var FeedListView = require('views/feedlist.view');

    require('models/feed');
    require('models/feedlist');

    return Backbone.View.extend({
        tagName: "div",
        template: _.template($("#feed-container").html()),
        events: {
            "click .right-button": "render"
        },
        render: function () {
            $(this.el).html(this.template({}));
            console.log("feed container render");
            feedsView = new FeedListView({ model: new FeedList() });
            $(this.el).find('.content-primary').append(feedsView.el);

            return this;
        },
        initialize: function () {
            _.bindAll(this, 'render', 'clear');
        },
        clear: function () {
            $(this.el).find('.content-primary').empty();
        }

    });

});